Graphics

Legend:
x is X coordinate and y is Y coordinate, both are v|n

BOX[FILLED] [x1, y1] TO x2, y2

Draws a [filled] box with the set COLOR statement from current top-left (x,y) position if first arguments are omitted or from (x1,y1) if passed, to the bottom right (x2,y2) position.


COLOR v|n

Sets the pen color to the v|n value

Notes:


GOTOXY x, y

Places the drawing pen at position (x,y)

Notes:


GPRINT c|t, x, y[, v|n1[, v|n2]]

Displays c|t text at position (x,y), with frontcolor v|n1 and backcolor v|n2. v|n1 and v|n2 are optional parameters, current values for front and back colors are used if these parameters are not defined.

Notes:


$ IMAGE v|n, x, y

Puts image v|n with the top-left corner of the image being at position (x,y)

Notes:

Warning: there is no check on this image ID number as you can very well add your own customized images to your program. You may also remove or replace this set of images. Please refer to the RESOURCEFILE compiling directive for further information.


LINE [x1, y1] TO x2, y2

Draws a line from current (x,y) position if first arguments are omitted or from (x1,y1) if passed, to the (x2,y2) position


PSET x,y

Draws a pixel at position (x,y)


SCREEN v|n

Sets screen mode:
0 for black & white
1 for 4 grays
2 for 16 grays
3 for 256 colors
4 for 65536 colors

Notes:


$ SETRES v|n

Attempts to set the screen size to 320x320 pixels (high resolution) if v|n=1 and to 160x160 pixels (standard low resolution) if v|n=0.

Notes:


COLOR(v|n)

Returns backcolor if v|n=0 and frontcolor if v|n=1


COLORRGB(v|n1, v|n2, v|n3)

Returns a color given the Red (v|n1), Blue (v|n2) and Green (v|n3) gradients. Therefore v|n1, v|n2 and v|n3 have to be in the [0...255] range.


$ HIGHRES(v|n)

Attempts to set the screen size to 320x320 pixels (high resolution) if v|n=1 and to 160x160 pixels (standard low resolution) if v|n=0. Returns 1 if the function succeeded, 0 otherwise.

Notes:


PGET(x, y)

Returns current color of pixel at position (x,y)

Notes:


POSX

Returns the current X position of drawing pen


POSY

Returns the current Y position of drawing pen


SCREENMODE

Returns the current screen mode:
0 for black & white
1 for 4 grays
2 for 16 grays
3 for 256 colors
4 for 65536 colors


SCREENMODES

Returns the best screen mode available on the device:
0 for black & white devices
1 for 4 grays devices
2 for 16 grays devices
3 for 256 colors devices
4 for 65536 colors devices